package com.ruoyi.qualityManagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qualityManagement.mapper.MaterialQualityItemMapper;
import com.ruoyi.qualityManagement.domain.MaterialQualityItem;
import com.ruoyi.qualityManagement.service.IMaterialQualityItemService;

/**
 * 物料质检项管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-05
 */
@Service
public class MaterialQualityItemServiceImpl implements IMaterialQualityItemService 
{
    @Autowired
    private MaterialQualityItemMapper materialQualityItemMapper;

    /**
     * 查询物料质检项管理
     * 
     * @param inspectionItemId 物料质检项管理主键
     * @return 物料质检项管理
     */
    @Override
    public MaterialQualityItem selectMaterialQualityItemByInspectionItemId(Long inspectionItemId)
    {
        return materialQualityItemMapper.selectMaterialQualityItemByInspectionItemId(inspectionItemId);
    }

    /**
     * 查询物料质检项管理列表
     * 
     * @param materialQualityItem 物料质检项管理
     * @return 物料质检项管理
     */
    @Override
    public List<MaterialQualityItem> selectMaterialQualityItemList(MaterialQualityItem materialQualityItem)
    {
        return materialQualityItemMapper.selectMaterialQualityItemList(materialQualityItem);
    }

    /**
     * 新增物料质检项管理
     * 
     * @param materialQualityItem 物料质检项管理
     * @return 结果
     */
    @Override
    public int insertMaterialQualityItem(MaterialQualityItem materialQualityItem)
    {
        return materialQualityItemMapper.insertMaterialQualityItem(materialQualityItem);
    }

    /**
     * 修改物料质检项管理
     * 
     * @param materialQualityItem 物料质检项管理
     * @return 结果
     */
    @Override
    public int updateMaterialQualityItem(MaterialQualityItem materialQualityItem)
    {
        return materialQualityItemMapper.updateMaterialQualityItem(materialQualityItem);
    }

    /**
     * 批量删除物料质检项管理
     * 
     * @param inspectionItemIds 需要删除的物料质检项管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialQualityItemByInspectionItemIds(Long[] inspectionItemIds)
    {
        return materialQualityItemMapper.deleteMaterialQualityItemByInspectionItemIds(inspectionItemIds);
    }

    /**
     * 删除物料质检项管理信息
     * 
     * @param inspectionItemId 物料质检项管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialQualityItemByInspectionItemId(Long inspectionItemId)
    {
        return materialQualityItemMapper.deleteMaterialQualityItemByInspectionItemId(inspectionItemId);
    }
}
